package com.fjut.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjut.model.order.OrderInfo;
import com.fjut.result.Result;
import com.fjut.service.OrderInfoService;
import com.fjut.vo.order.OrderInfoQueryVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 订单表 订单表 前端控制器
 * </p>
 *
 * @author DengTianxun
 * @since 2023-03-09
 */
@Api(tags = "订单管理接口")
@RestController
@RequestMapping("/fjut/order/orderInfo")
public class OrderInfoController {

    @Autowired
    private OrderInfoService orderInfoService;

    @ApiOperation("订单列表")
    @GetMapping("pageList/{page}/{limit}")
    public Result pageList(@PathVariable Long page, @PathVariable Long limit, OrderInfoQueryVo infoQueryVo){
        Page<OrderInfo> orderInfoPage = new Page<>(page,limit);
        return Result.success(orderInfoService.pageList(orderInfoPage,infoQueryVo));
    }
}

